#include<iostream>
#include<memory>
#include<ctime>
#include"threadpool.hpp"
#include"Task.hpp"
#include<sys/types.h>
#include<unistd.h>
int main()
{
    Threadpool<Task>::GetInstance()->Start();
    srand((uint64_t)time(nullptr)^getpid());

    while(true)
    {
       
        int x = rand() % 100 + 1;
        usleep(1234);
        int y = rand() % 200;
        usleep(1234);
        char oper = opers[rand() % opers.size()];
        Task t(x,y,oper);
        Threadpool<Task>::GetInstance()->Push(t);
        sleep(1);
    }

    Threadpool<Task>::GetInstance()->Join();
    return 0;
}